using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebFoundation;

namespace MHI.InspectionManager.Interfaces
{
	/// <summary>
	/// DevInspectionpointinfoT,table entity:dev_inspectionpointinfo_t 
	/// </summary>
	public class DevInspectionpointinfoT
	{
		public static readonly string KeyId;
		public static readonly string KeyCode;
		public static readonly string KeyName;
		public static readonly string KeyLocationId;
		public static readonly string KeyType;
		public static readonly string KeyGmtCreated;
		public static readonly string KeyPersonModified;
		public static readonly string KeyGmtModified;
		public static readonly string KeyStateInfo;
		public static readonly string KeyIsUse;
		public static readonly string KeyVersion;
		

		static DevInspectionpointinfoT()
		{
			KeyId = ExpressionHelper.GetPropertyName<DevInspectionpointinfoT>(r => r.Id);
			KeyCode = ExpressionHelper.GetPropertyName<DevInspectionpointinfoT>(r => r.Code);
			KeyName = ExpressionHelper.GetPropertyName<DevInspectionpointinfoT>(r => r.Name);
			KeyLocationId = ExpressionHelper.GetPropertyName<DevInspectionpointinfoT>(r => r.LocationId);
			KeyType = ExpressionHelper.GetPropertyName<DevInspectionpointinfoT>(r => r.Type);
			KeyGmtCreated = ExpressionHelper.GetPropertyName<DevInspectionpointinfoT>(r => r.GmtCreated);
			KeyPersonModified = ExpressionHelper.GetPropertyName<DevInspectionpointinfoT>(r => r.PersonModified);
			KeyGmtModified = ExpressionHelper.GetPropertyName<DevInspectionpointinfoT>(r => r.GmtModified);
			KeyStateInfo = ExpressionHelper.GetPropertyName<DevInspectionpointinfoT>(r => r.StateInfo);
			KeyIsUse = ExpressionHelper.GetPropertyName<DevInspectionpointinfoT>(r => r.IsUse);
			KeyVersion = ExpressionHelper.GetPropertyName<DevInspectionpointinfoT>(r => r.Version);
		}
		

		private long _id; 
		private string _code; 
		private string _name; 
		private long? _locationId; 
		private string _type; 
		private DateTime? _gmtCreated; 
		private string _personModified; 
		private DateTime? _gmtModified; 
		private float? _stateInfo; 
		private int _isUse; 
		private long _version; 
		

		/// <summary>
		///  Id, column: id required
		/// </summary>
		[DisplayName("编码")]
		[Required]
		public long Id
		{
			get{ return _id; }
			set
			{
				if(_id != value)
				{
					_id = value;
					NotifyOfChange(KeyId);
				}
			}
		}

		/// <summary>
		///  Code, column: code 
		/// </summary>
		[DisplayName(" 巡检点编号")]
		public string Code
		{
			get{ return _code; }
			set
			{
				if(_code != value)
				{
					_code = value;
					NotifyOfChange(KeyCode);
				}
			}
		}

		/// <summary>
		///  Name, column: name 
		/// </summary>
		[DisplayName(" 巡检点名称")]
		public string Name
		{
			get{ return _name; }
			set
			{
				if(_name != value)
				{
					_name = value;
					NotifyOfChange(KeyName);
				}
			}
		}

		/// <summary>
		///  LocationId, column: location_id 
		/// </summary>
		[DisplayName(" 预处理站等")]
		public long? LocationId
		{
			get{ return _locationId; }
			set
			{
				if(_locationId != value)
				{
					_locationId = value;
					NotifyOfChange(KeyLocationId);
				}
			}
		}

		/// <summary>
		///  Type, column: type 
		/// </summary>
		[DisplayName(" 巡检点类型")]
		public string Type
		{
			get{ return _type; }
			set
			{
				if(_type != value)
				{
					_type = value;
					NotifyOfChange(KeyType);
				}
			}
		}

		/// <summary>
		///  GmtCreated, column: gmt_created 
		/// </summary>
		[DisplayName(" 创建时间")]
		public DateTime? GmtCreated
		{
			get{ return _gmtCreated; }
			set
			{
				if(_gmtCreated != value)
				{
					_gmtCreated = value;
					NotifyOfChange(KeyGmtCreated);
				}
			}
		}

		/// <summary>
		///  PersonModified, column: person_modified 
		/// </summary>
		[DisplayName(" 更新人")]
		public string PersonModified
		{
			get{ return _personModified; }
			set
			{
				if(_personModified != value)
				{
					_personModified = value;
					NotifyOfChange(KeyPersonModified);
				}
			}
		}

		/// <summary>
		///  GmtModified, column: gmt_modified 
		/// </summary>
		[DisplayName(" 更新时间")]
		public DateTime? GmtModified
		{
			get{ return _gmtModified; }
			set
			{
				if(_gmtModified != value)
				{
					_gmtModified = value;
					NotifyOfChange(KeyGmtModified);
				}
			}
		}

		/// <summary>
		///  StateInfo, column: state_info 
		/// </summary>
		[DisplayName("标识状态")]
		public float? StateInfo
		{
			get{ return _stateInfo; }
			set
			{
				if(_stateInfo != value)
				{
					_stateInfo = value;
					NotifyOfChange(KeyStateInfo);
				}
			}
		}

		/// <summary>
		///  IsUse, column: is_use 
		/// </summary>
		[DisplayName("是否可用")]
		[Required]
		public int IsUse
		{
			get{ return _isUse; }
			set
			{
				if(_isUse != value)
				{
					_isUse = value;
					NotifyOfChange(KeyIsUse);
				}
			}
		}

		/// <summary>
		///  Version, column: version 
		/// </summary>
		[DisplayName("版本")]
		[Required]
		public long Version
		{
			get{ return _version; }
			set
			{
				if(_version != value)
				{
					_version = value;
					NotifyOfChange(KeyVersion);
				}
			}
		}

		public event PropertyChangedEventHandler PropertyChanged;

		private void NotifyOfChange(string propertyName)
		{
			if (this.PropertyChanged != null)
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
}
